package com.ruoyi.personnel.oa.schedule.service;

import com.ruoyi.personnel.oa.schedule.domain.DeptSchedule;
import com.ruoyi.personnel.oa.schedule.domain.ScheduleCond;
import com.ruoyi.personnel.oa.schedule.mapper.DeptScheduleMapper;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * 部门日程
 * 业务处理层
 */
@Service
public class DeptScheduleServiceImpl implements IDeptScheduleService{
    @Autowired
    private DeptScheduleMapper deptScheduleMapper;

    /**
     * 根据搜索条件所有部门日程记录
     * @param cond 搜索条件
     * @return
     */
    @Override
    public List<DeptSchedule> selectDeptScheduleList(ScheduleCond cond) {
        return deptScheduleMapper.selectDeptScheduleList(cond);
    }

    /**
     * 新增部门日程
     * @param schedule
     * @return
     */
    @Override
    public int insertDeptSchedule(DeptSchedule schedule) {
        return deptScheduleMapper.insertDeptSchedule(schedule);
    }

    /**
     * 修改部门日程
     * @param schedule
     * @return
     */
    @Override
    public int updateDeptSchedule(DeptSchedule schedule) {
        return deptScheduleMapper.updateDeptSchedule(schedule);
    }

    /**
     * 删除部门日程
     * 仅修改删除标志
     * @param schedule
     * @return
     */
    @Override
    public int updateDeptScheduleDeleteFlag(DeptSchedule schedule) {
        return deptScheduleMapper.updateDeptScheduleDeleteFlag(schedule);
    }
}
